#
#copyright (C) 2017-2030 TW
#
#by Bob@TW@18:02-2017-09-13.
#

MODULE = libmu-0.0.0

SHLIB_SUB_DIRS = sources
SHLIB_ALL_OBJS = $(addprefix $(MUDP_BUILD_DIR)/mu/lib/libmu/libmu-0.0.0/, $(addsuffix .o, $(SHLIB_SUB_DIRS)))

.PHONY: all prepare menuconfig build install rootfs clean 

all: clean prepare build install rootfs
	echo build all of libmu-0.0.0

prepare:
	echo nothing to do.

menuconfig:
	echo nothing to do.
	
build: $(SHLIB_ALL_OBJS)
	echo Build libmu start...
	$(CC) -shared $(SHLIB_ALL_OBJS) -o $(MUDP_BUILD_DIR)/mu/lib/libmu/libmu.so
	echo Done!!!

$(SHLIB_ALL_OBJS): $(SHLIB_SUB_DIRS)
	make -C $(SHLIB_SUB_DIRS)

install:
	cp -rf $(MUDP_BUILD_DIR)/mu/lib/libmu/libmu.so $(MUDP_INSTALL_DIR)/lib
	
rootfs:
	cp -rf $(MUDP_BUILD_DIR)/mu/lib/libmu/libmu.so $(MUDP_ROOTFS_DIR)/lib

clean:
	rm -rf $(MUDP_BUILD_DIR)/mu/lib/libmu
	